﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LuShanTea.Front.Web.App_Start
{
    public class LuShanTeaExceptionFilter : IExceptionFilter
    {
        ILog log = LogManager.GetLogger(typeof(LuShanTeaExceptionFilter));


          public void OnException(ExceptionContext filterContext)
        {
            log.ErrorFormat("前台异常："+filterContext.Exception);
            filterContext.ExceptionHandled = true;
            filterContext.Result = new HttpNotFoundResult();
        }
    }
}